import React from 'react'

import {
    Route,
    Switch
} from 'react-router-dom'

import SearchBar from '@/components/searchBar/SearchBar'
import BSScroll from '@/components/bsScroll/BSScroll'
import HomeTop from './HomeTop'
import HomeSwiper from './HomeSwiper'
import HomeGrid from './HomeGrid'
import HospitalList from '../hospitalList/HospitalList'
import HospitalHome from '../hospitalhome/HospitalHome'
import TeamHome from '../teamhome/TeamHome'
import Apply from '../apply/Apply'
import MyTeam from './MyTeam'

export default function Home() {
    return (
        <>
            <Switch>
                <Route path='/home/apply/:id'>
                    <Apply>
                    </Apply>
                </Route>
                <Route path='/home/hospitalhome/:id'>
                    <HospitalHome>
                    </HospitalHome>
                </Route>
                <Route path='/home/hospitalhome'>
                    <HospitalHome>
                    </HospitalHome>
                </Route>
                <Route path='/home/hospitallist'>
                    <HospitalList>
                    </HospitalList>
                </Route>
                <Route path='/home/team/:id'>
                    <TeamHome>
                    </TeamHome>
                </Route>
                <Route path='/home/team'>
                    <TeamHome>
                    </TeamHome>
                </Route>
                <Route path='/home'>
                    <HomeTop></HomeTop>
                    <BSScroll
                    id ='home-scroll'
                    height = '5.8rem'
                    >
                        <SearchBar
                        text = '搜索机构/医生'
                        width = '3.35rem'
                        ></SearchBar>
                        <HomeSwiper></HomeSwiper>
                        <HomeGrid></HomeGrid>
                        <MyTeam></MyTeam>
                    </BSScroll>
                    
                </Route>
                
            </Switch>
            
        </>
        
    )
}
